package com.codes.service.impl;

import com.codes.dao.PermissionMapper;
import com.codes.model.Permission;
import com.codes.service.PermissionSV;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Date 2020/5/27 15:52
 * @Created by peanut
 */
@Service
public class PermissionImpl implements PermissionSV {

    @Autowired
    private PermissionMapper permissionMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return 0;
    }

    @Override
    public int insert(Permission record) {
        return 0;
    }

    @Override
    public int insertSelective(Permission record) {
        return 0;
    }

    @Override
    public Permission selectByPrimaryKey(Integer id) {
        return null;
    }

    @Override
    public int updateByPrimaryKeySelective(Permission record) {
        return 0;
    }

    @Override
    public int updateByPrimaryKey(Permission record) {
        return 0;
    }

    @Override
    public List<Map<String,Object>> selectPerByRoleId(Integer roleId) {
        return permissionMapper.selectPerByRoleId(roleId);
    }

    @Override
    public List<Map<String, Object>> getAllPermission(Map map) {
        return permissionMapper.getAllPermission(map);
    }

    @Override
    public List<Map<String, Object>> getAllPer() {
        return permissionMapper.getAllPer();
    }

    @Override
    public int deleteByRoleId(Integer roleId) {
        return permissionMapper.deleteByRoleId(roleId);
    }
}